package day06.homework.demo2;

import java.util.Calendar;
import java.util.Date;

public class Emp {
    private String name;

    private Date birthday;

    public Emp(){
    }

    public Emp(String name, Date birthday) {
        this.name = name;
        this.birthday = birthday;
    }

    public double getSalary(int month){
        Calendar cal = Calendar.getInstance();
        cal.setTime(birthday);
        double salary = 0.0d;
        if(cal.get(Calendar.MONTH)+1==month)
            salary = 100.0d;
        return salary;
    }
}
